﻿using System;
using System.Reflection;

namespace SampleUI
{
    public static class Program
    {
        public static void Main(string[] args)
        {
            Console.WriteLine("+----------------------------------------+");
            Console.WriteLine("|+--------------------------------------+|");
            Console.WriteLine("|| Repository Business Framework Sample ||");
            Console.WriteLine("|+--------------------------------------+|");
            Console.WriteLine("+----------------------------------------+");
            Console.WriteLine();
            Console.WriteLine("Version: {0}", Assembly.GetEntryAssembly().GetName().Version);
            Console.WriteLine();
            while (true)
            {

                Console.ForegroundColor = ConsoleColor.White;

                Console.WriteLine("Please select an option:");
                Console.WriteLine();
                Console.WriteLine("0) Exit");
                Console.WriteLine("1) Address Management");
                Console.WriteLine("2) Contact Management");
                Console.WriteLine();

                switch (Console.ReadKey().KeyChar)
                {
                    case '1':
                        AddressManagement.Run();
                        break;
                    case '2':
                        ContactManagement.Run();
                        break;
                    case '0':
                        return;
                }
                Console.WriteLine("");
            }
        }
    }
}
